package com.example.common.constants;

public class RdsConstants {
    public static final Long CACHE_NULL_TTL = 5L;                 // 空值缓存有效期（分钟）
    public static final Long CACHE_TTL = 30L;                    // 缓存有效期（分钟）
    public static final Long CACHE_Long_TTL = 7 * 24 * 60L;               //（7天）一般不太经常修改的信息（比如，老师班级信息，学生班级信息）
    public static final String ID_ALL_DATE = "*";

    public static final String LOCK_KEY = "lock:";

    public static final String TEACHER_INFO = "teacher:Info:";
    public static final String STUDENT_INFO = "student:Info:";
    public static final String USER_INFO = "user:Info:";
    public static final String HOMEWORK_INFO = "Homework:Info:";
    public static final String COURSE_INFO = "course:Info:";
    public static final String CLASS_STUDENT_KEY = "class:students:Info:";
    public static final String CLASS_TEACHER_KEY = "class:teacher:Info:";
    public static final String RESOURCE_INFO = "resource:Info";
    public static final String QUESTION_INFO="question:Info:";
    public static final String COURSE_TEACHER_INFO = "courseTeacher:Info";
    public static final String SECTION_INFO = "section:Info:";
    public static final String ATTENDANCE_INFO = "attendance:Info:";
    public static final String HANDOUTS_INFO = "handouts:Info:";
    public static final String CLASSES_INFO_KEY = "classes:Info:";
    public static final String PPT_INFO = "ppt:Info:";
    public static final String EXPERIMENT_INFO = "experiment:Info:";
    public static final String CLASS_COURSE_KEY = "class:course:Info:";


    public static final String USER_ACTIVITY = ":activity:";   //老师和学生 统计用户今日访问次数  teacher::activity:
    public static final String USER_MODULE = ":module:";         // 统计用户模块访问（根据路径确定模块）  老师或者学生，模块，id，时间
    public static final String USER_LAST_VISIT = ":lastVisit::";   //记录最后访问时间
    public static final String USER_ACTIVE = ":active:";  //统计总活跃用户数（使用HyperLogLog去重）
    public static final String TEACHER_ACTIVE = "teacher:active:";   // 统计老师活跃用户数（使用HyperLogLog去重）
    public static final String STUDENT_ACTIVE = "student:active:";


    // 周活跃用户统计 key 模板(老师和学生)
    public static final String WEEKLY_ACTIVE_KEY = "%s:active:week:%d"; // %s=userType, %d=weekNumber

    // 用户访问模块统计 hash key 模板(老师和学生)
    public static final String USER_MODULE_KEY = "%s:module:week:%d:%s"; // %s=userType, %d=weekNumber, %s=userId

    public static final String TEACHER_COURSE_INFO = "teacher:Course:Info:";// 签到码（有前端老师设置签到码时间）
}
